<div class="rt-container">
<div class="rt-grid-12 ">
<div class="rt-block">
<div id="rt-mainbody">
<div class="component-content">

<!-- Start K2 Category Layout -->
<div class="TagCloudBlock">
<div id="portfoliosorting">
<div class="tableSearch">
    <form name="frmSearch" action="/tour/search/index" method="POST">
        <table>
            <tr>
                <td class="label">
                    Loại tour
                </td>
                <td style="width:150px">
                   <select name="LOAITOUR" value="">
                            <option value="">Chọn</option>
                          <?php foreach($this->listTourType as $item){
                           ?>
                            <option value="<?=$item['id']?>" <?=($this->params['LOAITOUR']==$item['id']?'selected="true"':'')?> ><?=$item['name']?></option>
                        <?php } ?>
                    </select>
                </td>
                <td class="label" style="width:85px">
                    Nơi khởi hành
                </td>
                <td style="width:150px">
                    <select name="CITY" value="">
                        <option value="">Chọn</option>
                    <?php 
                        foreach($this->listCity as $city){
                    ?>
                        <option value="<?=$city['id']?>" <?=($this->params['CITY'] == $city['id']?'selected="true"':'' )?>><?=$city['name']?></option>
                    <?php } 
                    ?>
                    </select>
                </td>
                <td class="label" style="width:45px;">
                </td>
                <td style="width:150px">
                </td>
            </tr>
            <tr>
                <td class="label">
                    Ngày khởi hành
                </td>
                <td style="width:150px">
                    <input type="text" name="STARTDATE" id="startDate" value="<?=$this->params['STARTDATE']?>" style="width:122px" />
                </td>
                <?php common::datePicker('startDate');?>
                <td class="label" style="width:40px">
                    Giá
                </td>
                <td style="width:150px">
                    <select name="PRICE" value="">
                        <?php 
                            $arrPrice = array(
                                $this->params['PRICE'] => 'selected="true"'
                            );
                        ?>
                        <option value=""> chọn </option>
                        <option value="1" <?=$arrPrice[1] ?>>Dưới 2 triệu/người</option>
                        <option value="2" <?=$arrPrice[2] ?>>2 - 4 triệu/người</option>
                        <option value="3" <?=$arrPrice[3] ?>>4 - 6 triệu/người</option>
                        <option value="4" <?=$arrPrice[4] ?>>6 - 10 triệu/người</option>
                        <option value="5" <?=$arrPrice[5] ?>>trên 10 triêu/người</option>
                    </select>
                </td>
                <td class="label" style="width:45px;">
                    <div id="buttonSearch">
                        <a href="javascript:document.frmSearch.submit()">Tìm kiếm </a>
                    </div>
                </td>
                <td style="width:10px;">
                    
                </td>
            </tr>
        </table>
    </form>
</div>
<div class="tableSearch" style="border:0px;align:right;">
    <font color="#00D7FE">TRANG &nbsp;&nbsp;</font> 
    <select name="page" value="" onchange="document.frm.submit();">
        <?php
            for($i = 0;$i<$this->lastPage;$i++){
                $number = $i + 1;
        ?>
        <option value="<?=$i?>" <?=($i==$this->pageCurrent?'selected="true"':'')?> >&nbsp; <?=$number ?> &nbsp;</option>
        <?php } ?>
    </select>        
</div>
</div>
</div>
<div id="k2Container container" class="itemListView portfolio port">
<div class="itemList portfolio-content">
    <div id="itemListPrimary">
        <?php 
            $rowCount = ceil(count($this->data)/3);
            $i=0;
            for($row = 0;$row<$rowCount;$row++){
        ?>
        <div class="portfolio-row">
            <?php
                $arrClass = array(
                "one_third id-1 all apartments rooms rows_3 itemContainer size_300",
                "one_third id-2 all apartments suites hotels rows_3 itemContainer size_300",
                "one_third id-3 all hotels rooms rows_3 itemContainer itemContainerLast size_300",
                );
                for($c = 0;$c<3;$c++){
            ?>
            <div class="<?=$arrClass[$c]?>">
                <div class="catItemView groupPrimary port">	
                    <?php if($this->data[$i]['TOUR_NAME']){ ?>
                    <div class="catItemBody">
                        <div class="catItemImageBlock">
                            <span class="catItemImage">
                                <a rel="{handler: 'image'}" class="modal" href="/<?=$this->data[$i]['IMAGE']?>" title="Room 1">
                                    <img src="/<?=$this->data[$i]['IMAGE']?>" alt="Room 1" style="width:300px; height:150px;" />
                                    <span class="zoom-icon"></span>
                                </a>
                            </span>
                            <div class="clr"></div>
                        </div>
                        <div class="overflow">
                            <div class="catItemHeader">
                                <h3 class="catItemTitle">
                                    <?=$this->data[$i]['TOUR_NAME']?> <a href="/tour/reservation/index/reservation/<?=$this->data[$i]['ID_TOUR']?>"> - Đặt ngay!</a>
                                </h3>
                            </div>
                            <div class="catItemIntroText">
                                <p>
                                    <a href=""><?=$this->data[$i]['COMPANY']?></a> : <?=$this->data[$i]['JOURNEY']?>
                                </p>
                            </div>
                            <div class="clr"></div>
                            <div class="clr"></div>
                        </div>
                    </div>
                    <div class="clr"></div>
                    <div class="clr"></div>
                    <div class="clr"></div>
                    <div class="clr"></div>
                    <?php } ?>
                </div>
            </div>
            <?php 
                $i++;
            }
            ?>
        </div>
        <?php } ?>
        
    <div class="clr"></div>
    </div>
</div>
</div>
<div class="clear"></div>
<div class="k2Pagination">
<div class="clr"></div>
</div>
</div>
</div>
</div>
</div>
<div class="clear"></div>
</div>